package cn.iune.erp.accounting;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;



//会计科目档案
@Entity
@Table(name = "AccountCaption",uniqueConstraints={@UniqueConstraint(columnNames={"captionNo", "enterpriseNo"})})
@NamedQuery(name="AccountCaption.findAll", query="SELECT s FROM AccountCaption s")
public class AccountCaption {

	@Id
	@Column(length=32)
	private String fID;
	
	@Column(length=32)
	private String systemCode;
	@Column(length=4)
	private String billType;
	@Column(length=20)
	private String billTypeName;
	private Date orderDate;
	@Column(length=10)
	private String state;
	@Column(length=10)
	private String status;

	@Column(length=10)
	private String captionNo;//科目编码
	@Column(length=50)
	private String captionName;//科目名称
	@Column(length=256)
	private String captionFullID;//全路径ID
	@Column(length=128)
	private String captionFullNo;//全路径编码
	@Column(length=256)
	private String captionFullName;//全路径名称
	
	@Transient
	@Column(length=100)
	private String sDescribe;//科目名称
	
	@Column(length=1)
	private String captionType;//科目类型
	@Column(length=20)
	private String captionTypeLabel;//科目类型
	
	
	private int dob =  1;//余额方向。1：借方余额，0：无余额，-1：贷方余额
	
	@Column(length=3)
	private String currency;//币种
	@Column(length=20)
	private String currencyLabel;//币种
	
	private int cashFlag =  0;//现金类科目：库存现金，银行存款，其他货币资金

	private int nodeLevel = 0;
	@Column(length=32)
	private String nodeKind;
	@Column(length=50)
	private String sortNo;
	@Column(length=32)
	private String fParent;
	
	private int carryFlag =  0;//损益科目是否参与结转
	
	@Column(length=10)
	private String carriedNo;//结转到科目编码
	@Column(length=50)
	private String carriedName;//结转到科目名称
	
	@Column(length=255)
	private String comments;
	
	@Column(length=15)
	private String cUsercode;
	@Column(length=20)
	private String cUsername;//制单人
	private Timestamp cDatetime;
	@Column(length=15)
	private String tUsercode;
	@Column(length=20)
	private String tUsername;//审核人
	private Timestamp tDatetime;
	@Column(length=15)
	private String eUsercode;
	@Column(length=20)
	private String eUsername;//关单人
	private Timestamp eDatetime;
	
	@Column(length=65)
	private String userId;

	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;

	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}


	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}


	public String getSystemCode() {
		return systemCode;
	}
	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillTypeName() {
		return billTypeName;
	}
	public void setBillTypeName(String billTypeName) {
		this.billTypeName = billTypeName;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}

	public int getDob() {
		return dob;
	}

	public void setDob(int dob) {
		this.dob = dob;
	}

	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getcUsercode() {
		return cUsercode;
	}
	public void setcUsercode(String cUsercode) {
		this.cUsercode = cUsercode;
	}
	public String getcUsername() {
		return cUsername;
	}
	public void setcUsername(String cUsername) {
		this.cUsername = cUsername;
	}
	public Timestamp getcDatetime() {
		return cDatetime;
	}
	public void setcDatetime(Timestamp cDatetime) {
		this.cDatetime = cDatetime;
	}
	public String gettUsercode() {
		return tUsercode;
	}
	public void settUsercode(String tUsercode) {
		this.tUsercode = tUsercode;
	}
	public String gettUsername() {
		return tUsername;
	}
	public void settUsername(String tUsername) {
		this.tUsername = tUsername;
	}
	public Timestamp gettDatetime() {
		return tDatetime;
	}
	public void settDatetime(Timestamp tDatetime) {
		this.tDatetime = tDatetime;
	}
	public String geteUsercode() {
		return eUsercode;
	}
	public void seteUsercode(String eUsercode) {
		this.eUsercode = eUsercode;
	}
	public String geteUsername() {
		return eUsername;
	}
	public void seteUsername(String eUsername) {
		this.eUsername = eUsername;
	}
	public Timestamp geteDatetime() {
		return eDatetime;
	}
	public void seteDatetime(Timestamp eDatetime) {
		this.eDatetime = eDatetime;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getfParent() {
		return fParent;
	}
	public void setfParent(String fParent) {
		this.fParent = fParent;
	}

	public String getCaptionNo() {
		return captionNo;
	}
	public void setCaptionNo(String captionNo) {
		this.captionNo = captionNo;
	}
	public String getCaptionName() {
		return captionName;
	}
	public void setCaptionName(String captionName) {
		this.captionName = captionName;
	}
	public String getCaptionFullID() {
		return captionFullID;
	}
	public void setCaptionFullID(String captionFullID) {
		this.captionFullID = captionFullID;
	}
	public String getCaptionFullName() {
		return captionFullName;
	}
	public void setCaptionFullName(String captionFullName) {
		this.captionFullName = captionFullName;
	}
	public String getCaptionFullNo() {
		return captionFullNo;
	}
	public void setCaptionFullNo(String captionFullNo) {
		this.captionFullNo = captionFullNo;
	}
	public int getNodeLevel() {
		return nodeLevel;
	}
	public void setNodeLevel(int nodeLevel) {
		this.nodeLevel = nodeLevel;
	}
	public String getNodeKind() {
		return nodeKind;
	}
	public void setNodeKind(String nodeKind) {
		this.nodeKind = nodeKind;
	}
	public String getSortNo() {
		return sortNo;
	}
	public void setSortNo(String sortNo) {
		this.sortNo = sortNo;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public String getCaptionType() {
		return captionType;
	}
	public void setCaptionType(String captionType) {
		this.captionType = captionType;
	}
	public String getCaptionTypeLabel() {
		return captionTypeLabel;
	}
	public void setCaptionTypeLabel(String captionTypeLabel) {
		this.captionTypeLabel = captionTypeLabel;
	}
	public String getsDescribe() {
		return sDescribe;
	}
	public void setsDescribe(String sDescribe) {
		this.sDescribe = sDescribe;
	}
	public int getCarryFlag() {
		return carryFlag;
	}
	public void setCarryFlag(int carryFlag) {
		this.carryFlag = carryFlag;
	}
	public String getCarriedNo() {
		return carriedNo;
	}
	public void setCarriedNo(String carriedNo) {
		this.carriedNo = carriedNo;
	}
	public String getCarriedName() {
		return carriedName;
	}
	public void setCarriedName(String carriedName) {
		this.carriedName = carriedName;
	}
	public String getCurrency() {
		return currency;
	}
	public void setCurrency(String currency) {
		this.currency = currency;
	}
	public String getCurrencyLabel() {
		return currencyLabel;
	}
	public void setCurrencyLabel(String currencyLabel) {
		this.currencyLabel = currencyLabel;
	}
	public int getCashFlag() {
		return cashFlag;
	}
	public void setCashFlag(int cashFlag) {
		this.cashFlag = cashFlag;
	}


	
	

}
